﻿@using AiXiu.Model
@model Dictionary<int, Friend>
@{
    ViewBag.Title = "Index";
}

<style>
    .media-list.friends .item-link .item-title-row {
        padding-right: 0;
    }

        .media-list.friends .item-link .item-title-row:before {
            width: 0;
            height: 0;
            overflow: hidden;
        }
</style>

<div class="page" data-page="friends">
    <div class="page-content">
        <div class="list media-list friends margin-top-none friends">
            <ul>
                @foreach (var item in Model)
                {
                    Friend friend = item.Value;
                    string avatar = friend.Avatar ?? "/imgs/avatar.jpg";
                    <li>
                        <a href="@Url.Action("Chat","Friends")?to=@item.Key" class="item-link item-content external">
                            <div class="item-media">
                                <img src="/imgs/square.jpg" data-src="@avatar" width="44" height="44" class="lazy" />
                            </div>
                            <div class="item-inner">
                                <div class="item-title-row">
                                    <div class="item-title">@friend.NickName</div>
                                    <div class="item-after size-small">@friend.LastMessage.AddTime</div>
                                </div>
                                <div class="item-subtitle text-color-gray size-small">@friend.LastMessage.Content</div>
                            </div>
                        </a>
                    </li>
                }
            </ul>
        </div>
    </div>
    <div class="toolbar tabbar tabbar-labels toolbar-bottom">
        <div class="toolbar-inner">
            <a href="@Url.Action("Index","Home")" class="tab-link external">
                <i class="icon f7-icons size-29">videocam</i>
                <span class="tabbar-label">视频</span>
            </a>
            <a href="@Url.Action("Index","Friends")" class="tab-link external tab-link-active">
                <i class="icon f7-icons size-22">bubble_left_bubble_right</i>
                <span class="tabbar-label">聊天</span>
            </a>
            <a href="@Url.Action("Index","Personal")" class="tab-link external">
                <i class="icon f7-icons size-25">person</i>
                <span class="tabbar-label">我的</span>
            </a>
        </div>
    </div>
</div>

